package edu.itcs6112.za.repository;

import java.util.List;

import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import org.springframework.data.repository.query.Param;

import edu.itcs6112.za.domain.Item;
import edu.itcs6112.za.domain.Order;

public interface OrderRepository extends CrudRepository<Order, Long> {
	public final static String FIND_BY_CUST_ID = "FROM Order o WHERE o.customerId = :customerId";
	@Query(FIND_BY_CUST_ID)
	List<Order> findByCustomerId(@Param("customerId") Long customerId);
}
